Meaning of the word "don't shit where you eat" in English

What does "don't shit where you eat" mean in English? Explore the meaning, pronunciation, and specific usage of this word with Lingoland.

don't shit where you eat

US /doʊnt ʃɪt wer ju iːt/
UK /dəʊnt ʃɪt weə ju iːt/
"don't shit where you eat" picture

Idiom

one should not cause trouble or behave badly in the place where one lives or works, especially by engaging in romantic relationships with colleagues

Example:
I know you like the new intern, but remember: don't shit where you eat.
He started dating his neighbor, but he soon realized why people say don't shit where you eat.